(import '(java.net Socket)
        '(java.io PrintWriter))

(defn peticiona
  []
  (let [socket (Socket. "www.google.com" 80)]
    (with-open [in (.getInputStream socket)
        out (PrintWriter. (.getOutputStream socket))]
       (.println out "GET / HTTP/1.0")
       (.println out)
       (.flush out)
       (loop []
         (let
           [c (.read in)]
            (when (not= -1 c)
              (print (char c))
              (recur)
              )
         )
       )
   )
  
)
)

(peticiona)
